from django.urls import path
from rest_framework_simplejwt.views import TokenRefreshView, TokenVerifyView
from .views.home.home import HomePageMessage, getAllPetList, ShopGoodsHomeMessage, getAllGoodsList
from .views.login.login import LoginView, CustomRegister, get_mobile_code,CaptchaAPIView
from .views.customInfo.customInfoMessage import GetCustomInfo, editPassword, UploadCustomAvatarImageView
from .views.customInfo.address import ChargeAddress, addAddressInfo, deleteAddress
from .views.customInfo.order import getOrder, cancel
from .views.customInfo.establish import NetShopPetNetMessageView, UploadNetShopPetImageView, deleteOnePetmsg
from .views.customInfo.reservation import GetNetShopFosterList, deleteOneFostermsg

urlpatterns = [
    path('homemessage/', HomePageMessage.as_view()),
    path('shopmessage/', ShopGoodsHomeMessage.as_view()),
    path('detailmessage/<int:id>/', getAllPetList),
    path('detailgoodsmessage/<int:id>/', getAllGoodsList),
    path('captcha/', CaptchaAPIView.as_view()),
    # 登录
    path('customLogin/', LoginView.as_view()),
    path('smsmobile/', get_mobile_code),
    # 注册
    path('register/', CustomRegister),
    # 根据ID返回顾客个人信息
    path('customInfo/', GetCustomInfo.as_view()),
    # 修改密码
    path('editPassword/', editPassword),
    # 编辑个人页上传图片
    path('uploadmessage/', UploadCustomAvatarImageView.as_view()),

    # 收货地址展示
    path('chargeaddress/', ChargeAddress.as_view()),
    # 添加收货地址
    path('addAddress/', addAddressInfo),
    # 删除收货地址
    path('deleteAddress/<int:id>/', deleteAddress),

    # 接收订单信息
    path('addorder/', getOrder.as_view()),
    # 按取消键取消订单
    path('clickcancel/', cancel),

    # 宠物建档页面获取全部宠物建档信息
    path('petmessage/', NetShopPetNetMessageView.as_view()),
    # 图片上传
    path('petmessage/upload/', UploadNetShopPetImageView.as_view()),
    # 删除一份宠物档案数据
    path('petmessage/<int:id>/', deleteOnePetmsg),

    # 对应账号的寄养基本信息
    path('fostermessage/', GetNetShopFosterList.as_view()),
    # 删除一份宠物档案数据
    path('fostermessage/<int:id>/', deleteOneFostermsg),
]
